﻿using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using BUS;
using DTO;
using DAO;
using HOTEL_MANAGEMENT;


namespace TestQLKS
{
    [TestFixture]
    class CHOADON
    {
        [Test]
        public void TestLaySoNgayThue()
        {
            CPHIEUTHUEDTO pt = new CPHIEUTHUEDTO();
            pt = null;
            CPHIEUTHUEDTO pt1 = new CPHIEUTHUEDTO();
            pt1 = CPHIEUTHUEDAO.LayThongTinPhieuThue(8);
            //   Assert.AreNotEqual(pt, pt1);
            //  DateTime bd = new DateTime();
            //   bd = DateTime.Parse("05/30/2011 02:47:10 AM");
            int kcng = CHOADONBUS.KhoangCanhNgay(pt1.NgayBatDau, DateTime.Now);
            Assert.AreEqual(kcng, 0);
            //   int kq = CHOADONBUS.SoNgayThue(16);
        }


        [Test]
        public void TestLayThongTinHoaDonTheoNgayKetThuc()
        {
            CHOADONDTO hd = new CHOADONDTO();

            hd = CHOADONDAO.LayThongTinHoaDonTheoNgayKetThuc("Ngô Văn Quyền", DateTime.Parse("05/29/2011 07:15:09 PM"));
            Assert.AreNotEqual(hd, null);
        }
        [Test]
        public void TestTraCuuHoaDonTheoYeuCau()
        {
            System.Data.DataTable dt = CHOADONDAO.TraCuuHoaDonTheoYeuCau("", DateTime.Now, "", "Tự động", "Tăng");
            Assert.AreNotEqual(dt, null);
        }


    }
}
